#ifndef _SCRIPTTYPE_H_
#define _SCRIPTTYPE_H_
#include <Core/Reflect.h>
#include <glm.hpp>

namespace Engine2D
{
    struct SLua_Vec2
    {
        float x, y;
        glm::vec2 ToGlm() { return glm::vec2(x, y); }
    };
    REF_REGISTER_CLASS(SLua_Vec2,
        REF_REGISTER_FIELD(SLua_Vec2, x),
        REF_REGISTER_FIELD(SLua_Vec2, y)
    )

    struct SLua_Vec3
    {
        float x, y, z;
        glm::vec3 ToGlm() { return glm::vec3(x, y, z); }
    };
    REF_REGISTER_CLASS(SLua_Vec3,
        REF_REGISTER_FIELD(SLua_Vec3, x),
        REF_REGISTER_FIELD(SLua_Vec3, y),
        REF_REGISTER_FIELD(SLua_Vec3, z)
    )

    struct SLua_Vec4
    {
        float x, y, z, w;
        glm::vec4 ToGlm() { return glm::vec4(x, y, z, w); }
    };
    REF_REGISTER_CLASS(SLua_Vec4,
        REF_REGISTER_FIELD(SLua_Vec4, x),
        REF_REGISTER_FIELD(SLua_Vec4, y),
        REF_REGISTER_FIELD(SLua_Vec4, z),
        REF_REGISTER_FIELD(SLua_Vec4, w)
    )

    struct SLua_RectF
    {
        float x, y, width, height;
    };
    REF_REGISTER_CLASS(SLua_RectF,
        REF_REGISTER_FIELD(SLua_RectF, x),
        REF_REGISTER_FIELD(SLua_RectF, y),
        REF_REGISTER_FIELD(SLua_RectF, width),
        REF_REGISTER_FIELD(SLua_RectF, height)
    )
    
    struct SLua_Rect
    {
        int x, y, width, height;
    };
    REF_REGISTER_CLASS(SLua_Rect,
        REF_REGISTER_FIELD(SLua_Rect, x),
        REF_REGISTER_FIELD(SLua_Rect, y),
        REF_REGISTER_FIELD(SLua_Rect, width),
        REF_REGISTER_FIELD(SLua_Rect, height)
    )


} // namespace Engine2D



#endif